﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MongoDBManager
{
    internal static class FileUtil
    {


        public static string CreateDataBaseDir(string dbname)
        {
            string dir = AppDomain.CurrentDomain.BaseDirectory + dbname + "_" + DateTime.Now.ToString("yyyy年MM月dd日 HH时mm分ss秒");
            if (!Directory.Exists(dir))
            {
                Directory.CreateDirectory(dir);
            }
            return dir;
        }

        public static string[] GetFiles(string dir)
        {

            string[] files = Directory.GetFiles(dir, "*.json");

            return files;
        }


    }
}
